package aparicio.mbox.parse;

import static org.junit.Assert.*;

import org.junit.Test;

public class SentSubjectTestCase {

	@Test
	public void testParseSentSubject() {
		String file = "test\\aparicio\\mbox\\parse\\mbox_good.mbox";
		MboxFile mbox = new MboxFile(file);
		
		try {
			mbox.parse();
		} catch (Exception e) {
			fail("Failed to correctly parse the emails");
		}
		
		assertEquals(2, mbox.getSentSubject().size());
		assertEquals("<Use your award miles for brand-name merchandise this spring>: IP <12.130.136.195>", mbox.getSentSubject().get(0));
		assertEquals("<Cross-Category Couponblast: We've Slashed Prices Across 23 Categories!>: IP <12.130.139.73>", mbox.getSentSubject().get(1));
	}

}
